﻿#ifndef DACOMMANDSOFWORKFLOW_H
#define DACOMMANDSOFWORKFLOW_H
// Qt
#include <QtCore/qglobal.h>
#include <QUndoCommand>
// workflow
#include "DANodeMetaData.h"
#include "DAAbstractNode.h"
namespace DA
{
class DAWorkFlowGraphicsScene;
class DAWorkFlowGraphicsView;
class DAGraphicsView;
class DAAbstractNodeGraphicsItem;
class DAGraphicsResizeablePixmapItem;

/**
 * @brief 添加背景
 */
class DACommandWorkFlowSceneAddBackgroundPixmap : public QUndoCommand
{
public:
    DACommandWorkFlowSceneAddBackgroundPixmap(DAWorkFlowGraphicsScene* scene, const QPixmap& pixmap, QUndoCommand* parent = nullptr);
    DACommandWorkFlowSceneAddBackgroundPixmap(DAWorkFlowGraphicsScene* scene, QPixmap&& pixmap, QUndoCommand* parent = nullptr);
    void redo();
    void undo();

private:
    DAWorkFlowGraphicsScene* _scene;
    QPixmap _pixmap;
    QPixmap _pixmapOld;
};
}  // namespace DA
#endif  // DACOMMANDSOFWORKFLOW_H
